fix(ban-all): report progress on job failure#112
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 37 minutes and 50 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughExtracted child-job completion handling into a shared Changes
Sequence Diagram(s)sequenceDiagram
participant Executor as Executor
participant Queue as BanAllQueue
participant Store as JobStore
participant Telegram as TelegramService
Executor->>Queue: emit "completed" / "failed" (child job)
Queue->>Store: load parent job & dependencies
Queue->>Store: recompute parent progress from dependency counts
Queue->>Queue: reportProgress(parentJob) --(debug log: parentId + counts)
Queue->>Telegram: throttle and send progress update
Telegram-->>Queue: success / throws error
alt Telegram error
Queue->>Queue: log warning with caught error object
end
Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/modules/moderation/ban-all.ts`:
- Around line 244-247: The event listeners on this.executor for "completed" and
"failed" call the async reportProgress without handling Promise rejections; wrap
those calls to ensure rejections are caught (e.g., call
reportProgress(job).catch(err => /* log or handle error */) or use an async IIFE
with try/catch) so any Redis/BullMQ failures do not create unhandled promise
rejections; update the handlers for the "completed" and "failed" events where
reportProgress is invoked to catch and log errors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 11de71a8-d4ad-4118-b1f2-b5bf68433ad5
📒 Files selected for processing (1)
src/modules/moderation/ban-all.ts
No description provided.